<a href="/" target="_self">
    <img src="/logo.png" class="logo __web-inspector-hide-shortcut__" alt="爱悦蓝天国际幼儿园LOGO">
</a>
<php>
    $len= count($categorys);
</php>
<div class="navbar navbar-default navbar-fixed-top">
    <div style="width: 1280px;margin: auto">
        <ul class="nav" style="width: 540px;float: left;display:flex">
            <if condition="$len==4||$len==3">
                <volist name="categorys" id="vo" length="2">
                    <li class="menu-item menu-item-level-1">
                        <a href="{$vo.href|default=''}" class="{$vo.id==$category['id']?'menu-active':''}">
                            {$vo.name}
                        </a>
                    </li>
                </volist>
            </if>
            <if condition="$len==5||$len==6">
                <volist name="categorys" id="vo" length="3">
                    <li class="menu-item menu-item-level-1">
                        <a href="{$vo.href|default=''}" class="{$vo.id==$category['id']?'menu-active':''}">
                            {$vo.name}
                        </a>
                    </li>
                </volist>
            </if>
            <if condition="$len==7||$len==8">
                <volist name="categorys" id="vo" length="4">
                    <li class="menu-item menu-item-level-1">
                        <a href="{$vo.href|default=''}" class="{$vo.id==$category['id']?'menu-active':''}">
                            {$vo.name}
                        </a>
                    </li>
                </volist>
            </if>
        </ul>
        <ul class="nav" style="width: 540px;margin-left:200px;float: left;display:flex">
            <if condition="$len==4||$len==5">
                <volist name="categorys" id="vo" offset="2">
                    <li class="menu-item menu-item-level-1">
                        <a href="{$vo.href|default=''}"
                           class="{$vo.id==$category['id']?'menu-active':''}">
                            {$vo.name}
                        </a>
                    </li>
                </volist>
            </if>
            <if condition="$len==6">
                <volist name="categorys" id="vo" offset="3">
                    <li class="menu-item menu-item-level-1">
                        <a href="{$vo.href|default=''}"
                           class="{$vo.id==$category['id']?'menu-active':''}">
                            {$vo.name}
                        </a>
                    </li>
                </volist>
            </if>
            <if condition="$len==7">
                <volist name="categorys" id="vo" offset="4">
                    <li class="menu-item menu-item-level-1">
                        <a href="{$vo.href|default=''}"
                           class="{$vo.id==$category['id']?'menu-active':''}">
                            {$vo.name}
                        </a>
                    </li>
                </volist>
            </if>
            <if condition="$len==8">
                <volist name="categorys" id="vo" offset="4">
                    <li class="menu-item menu-item-level-1">
                        <a href="{$vo.href|default=''}"
                           class="{$vo.id==$category['id']?'menu-active':''}">
                            {$vo.name}
                        </a>
                    </li>
                </volist>
            </if>
        </ul>
    </div>
</div>